11. Quiz: Facebook Friends (7-5)

Directions:

Create an object called facebookProfile. The object should have 3 properties:

  1. your name
  2. the number of friends you have, and
  3. an array of messages you've posted (as strings)

The object should also have 4 methods:

  1. postMessage(message) - adds a new message string to the array
  2. deleteMessage(index) - removes the message corresponding to the index provided
  3. addFriend() - increases the friend count by 1
  4. removeFriend() - decreases the friend count by 1

Your Code:

Start Quiz:

/*
 * Programming Quiz: Facebook Friends (7-5)
 */

// your code goes here

INSTRUCTOR NOTE:

Have questions? Head to Knowledge for discussion with the Udacity Community.